package com.project.dao;

import com.project.bean.CommentBean;
import java.util.List;
import java.util.Map;

public interface CommentMapper {
	//删除评论
    int deleteByPrimaryKey(Integer cmId);

    //添加评论
    int insert(CommentBean record);

    int insertSelective(CommentBean record);

    CommentBean selectByPrimaryKey(Integer cmId);

    int updateByPrimaryKeySelective(CommentBean record);

    int updateByPrimaryKey(CommentBean record);

    int insertBatchSelective(List<CommentBean> records);

    int updateBatchByPrimaryKeySelective(List<CommentBean> records);

    //分页查询评论
	List<CommentBean> findByPage(Map<String, Integer> map);

	//通过动态的id查询所有的评论
	List<CommentBean> findAllByPid(Integer pid);
}